package cn.opopopo.design_pattern_learn.结构型.decorator.demo1;

/**
 *  加牛奶装饰器
 */
public class MilkDecorator extends CoffeeDecorator {
    public MilkDecorator(Coffee coffee) {
        super(coffee);
    }

    @Override
    public double cost() {
        return super.cost() + 1.0;  // 增加牛奶价格
    }

    @Override
    public String getDescription() {
        return super.getDescription() + ", Milk";
    }
}